#include "Stars.h"
#include <math.h>

Stars::Stars()
{
	radius=2500;
	numStars = 1000;
	ps.changeSize(1000);
}

void Stars::initializeStars(int NumberOfStars)
{
	numStars = NumberOfStars;
	ps.changeSize(NumberOfStars);
}

void Stars::setUpStars()
{
	double transX;
	double transY;
	double transZ;

	double theta  = rand() % 360;
	double gamma  = rand() % 180;

	for(int i = 0; i<numStars; i++)
	{
	double theta  = rand() % 360;
	double gamma  = rand() % 180;

	transX = radius*sin(theta)*cos(gamma);
	transY = radius*cos(theta);
	transZ = radius*sin(theta)*sin(gamma);

	ps.updateSingleParticle(i,transX, transY, transZ);
	}
}